package org.lanqiao.tools;

import java.util.Properties;

import javax.sql.DataSource;

import org.apache.commons.dbutils.QueryRunner;


import com.alibaba.druid.pool.DruidDataSourceFactory;
import com.google.gson.Gson;

public class DBTools {
	public static QueryRunner query;
	public static Gson gson=new Gson();
	static {
		Properties properties=new Properties();
		try {
			properties.load(DBTools.class.getResourceAsStream("/Druid.property"));
			DataSource ds=DruidDataSourceFactory.createDataSource(properties);
			query=new QueryRunner(ds);
		} catch (Exception e) {
			e.printStackTrace();
		}	
	}
}
